#!/usr/bin/env python
# -*- coding: utf-8 -*-


import os,time

bin_path = '/home/vv/codes/Jupiter/'

if __name__ == '__main__' :
    os.system('date')
    result=os.popen('ps -ef|grep search_server').read().split('\n')
    print result
    if len(result) < 4:
        print 'not running, need to start...'
        os.system('cd '+bin_path+'; ./search_server')
        print 'search server started'
    else:
        print 'already running.'
